Translate BPS 您所在的位置:网站首页 translate code to english text Translate BPS

Translate BPS

2022-05-22 10:14| 来源: 网络整理| 查看: 265

WordPress Language Translation .po and .mo files are not necessary to translate the BulletProof Security plugin鈥檚 English language into your language. Please click the BulletProof Security Forum Topic link below to find out how to use the Google Chrome Browser to automatically translate the English text in the BulletProof Security plugin into your language.

http://forum.ait-pro.com/forums/topic/bulletproof-security-language-translation-google-chrome-automatic-language-translation-for-plugins/

 

This聽WordPress Plugin Language Translation Tutorial is using the BulletProof Security WordPress plugin as the example for this tutorial. 聽The same Poedit language translation techniques would be used to translate other WordPress plugins. 聽There are 2 language translation methods shown in this tutorial. 聽The second method is probably the simpler and faster method –聽New Catalog from POT file… Plugin Language Translation – Method 2.

Language Translation Tutorial For The BulletProof Security Plugin With Poedit聽 New Catalog… Plugin Language Translation – Method 1聽 Download the bulletproof-security.zip file and the Poedit .po editing software

1.聽Download the BulletProof Security zip file to your computer from WordPress.org herehttp://wordpress.org/extend/plugins/bulletproof-security/The zip file name will be bulletproof-security.0.47.zip (or whatever version of BPS that you will be translating).

2. Unzip the zip file to your C: Drive. This will create a folder called bulletproof-security. C:\bulletproof-security.

3. Download and install Poedit from here http://www.poedit.net/download.php.

Set up Poedit to Translate the BulletProof Security plugin into your language

4. Open Poedit, click on the File menu, click on New catalog… you will see this window below.

Poedit Settings - Project info window

5. For Project name and version: type in bulletproof-security and then choose your Language and Country and type in your Team and Team’s email address.

6. Click on the Paths tab. Click on the New Item button and type in the path to the bulletproof-security folder the unzipped on your computer. Very Important! After typing in the path to the bulletproof-security folder you need to click anywhere in the white area below the path you just entered in order for the path to be saved. See the next screenshot with an arrow pointing to the white area below the path you just entered. The blue box should disappear, which will indicate that the path is saved. This also applies to adding New items to the Keywords Tab as well.

Poedit Settings - Paths

Poedit Settings - Paths save

7. 聽Click on Keywords tab. 聽Click on the New item button and add _e (underscore e), then add __ 聽(double underscores) and click the OK button. 聽Very Important! After typing in the _e and __ New items you need to click anywhere in the white area below just like you did on the Paths tab to save your path. 聽The blue box should disappear, which will indicate that both of your New items are saved.聽

Poedit Settings - Keywords

Creating and naming your .po file

8. When you click the OK button a file explorer window will automatically open. Navigate to the bulletproof-security folder you unzipped on your computer. You will be saving your new .po file using the naming convention shown below. In this example I am creating a Spanish .po translation file using the naming convention of bulletproof-security-es_ES.po. Very Important! The naming convention for your .po file is composed of a Language Code and a Country Code. The lower case “es” is for the Spanish language and the upper case “ES” is for Spain. For a German .po file for BPS the file name would be bulletproof-security-de_DE.po. Your .mo file will automatically be created by Poedit and named using the same naming convention of your .po file automatically.

Find Your Language Code and Country Code For Naming Your .po Filehttp://www.gnu.org/software/gettext/manual/html_chapter/gettext_16.html#Language-Codes

Poedit Save As Window

Poedit Updating catalog…

9. If you have done everything correctly then when you click the Save button you should see an Updating catalog… window and then an Update summary window pop up. When you click the OK button you will now see BulletProof Security plugin text strings ready for translation. See next screenshot.

Poedit Updating catalog

Translating the BulletProof Security Plugin Text Strings

10. After clicking the OK button you will see the BulletProof Security plugin text strings ready for translation.

Poedit Translating Plugin Strings

Translating the BulletProof Security Plugin Text Strings Continued

11. To translate each text string you will click on it and then enter the translation of the text string in the bottom text area. In this example I have translated the English word “Settings” to the Spanish word “Configuraci贸n”. In the right Translation window you will see your translated words. Once you have completed translating all the English text strings into your language you will then click the File menu and click Save. This will save your .po file and also save your .mo file that was automatically created by Poedit. 聽

To speed up the language translation process, you can use the Google Language Translator. 聽Copy the original text to be translated into Google Translate and then make any corrections to the translation directly within the Google Translator window. 聽Your corrections will be remembered so that any other similar translations will not need to be corrected. 聽Then copy the translated text back into Poedit. 聽This is a huge time saver since you would not need to actually type in the text translation and would instead just be doing a copy and paste from Google Translate to Poedit.

In this example for creating Spanish translation files for BPS, the 2 files are named: bulletproof-security-es_ES.po and bulletproof-security-es_ES.mo. If you were translating BPS into German the 2 files would be named: bulletproof-security-de_DE.po and bulletproof-security-de_DE.mo.

Important Note:聽 for text strings that contain %s please include those in your translated text.Example: Original string: Downloaded %s times Translation: Descargado %s veces

Send your completed .po and .mo BulletProof Security plugin translation files to info[at]ait-pro[dot]com.

Poedit Translating Plugin Strings cont.

Troubleshooting

If something is not set up correctly and you did not see the BulletProof Security plugin text strings you can manually check your Poedit settings by clicking on the Catalog menu and then click Settings… where you can check the Project info, Paths and Keywords Tabs for incorrect settings.

Poedit Settings - Troubleshooting

To manually run another check for translatable text strings in the BulletProof Security php plugin files you can click on Update catalog button on the Poedit toolbar.

Poedit - Manually Update Catalog

 

Language Translation Tutorial For The BulletProof Security Plugin With Poedit聽 New Catalog from POT file… Plugin Language Translation – Method 2聽 Download the bulletproof-security.zip file and the Poedit .po editing software

1. Download the BulletProof Security zip file to your computer from WordPress.org herehttp://wordpress.org/extend/plugins/bulletproof-security/The zip file name will be bulletproof-security.0.47.zip (or whatever version of BPS that you will be translating).

2. Unzip the zip file to your C: Drive. In this tutorial the folder name I used is: 聽C:\BPS47.

3. Download and install Poedit from here http://www.poedit.net/download.php.

4.聽Open Poedit, click the File menu and click New Catalog from POT file… 聽The Open catalog template window will open. 聽Navigate to the folder where you unzipped the 聽zip file you downloaded and click on the bulletproof-security.pot file and click the Open button. 聽For this example the folder path is: 聽C:\BPS47\languages.

Poedit - New catalog from POT file...

Poedit - Open POT catalog file

5.聽After clicking the Open button the Poedit Settings window will open to the Project info Tab. 聽Enter your Team name, Team’s email address, choose the Language that you will be translating the plugin too and choose the Country that is associated with the language translation. 聽You only need to enter in the Project info information and click the OK button. 聽The Paths and Keywords Tabs already contain the correct information and do not require additional changes by you.

Poedit - Settings Project info

Poedit - Settings Project info

6.聽After clicking the OK button a Save as… window will open. 聽Type in the name of your new .po file. 聽For this example I am creating a Spanish .po language translation file. 聽So the name of the file will be: 聽bulletproof-security-es_ES.po and then click Save. 聽

Very Important! The naming convention for your .po file is composed of a Language Code and a Country Code. The lower case “es” is for the Spanish language and the upper case “ES” is for Spain. For a German .po file for BPS the file name would be bulletproof-security-de_DE.po. Your .mo file will automatically be created by Poedit and named using the same naming convention of your .po file automatically.

Find Your Language Code and Country Code For Naming Your .po Filehttp://www.gnu.org/software/gettext/manual/html_chapter/gettext_16.html#Language-Codes

Poedit - Save as... name your po file

7. After clicking Save you will now see the BulletProof Security plugin text strings ready for language translation.

Poedit - Save as... window

8. See Step 11. above – Translating the BulletProof Security Plugin Text Strings Continued

More Help Resources

http://www.appthemes.com/blog/how-to-translate-a-wordpress-theme/

http://codex.wordpress.org/User:Skippy/Creating_POT_Files

http://codex.wordpress.org/I18n_for_WordPress_Developers

http://codex.wordpress.org/Translating_WordPress

聽 Bonus WordPress Language Translation Tutorial – checking .po and .mo files

Quickly switch WP Dashboard admin languages with a single click without having to modify the wp-config.php file. 聽This comes in real handy if you are checking language translation .po and .mo files for errors.

1. Install the WP Native Dashboard plugin –聽http://wordpress.org/extend/plugins/wp-native-dashboard/

2. Download the WordPress version in the language you want –聽http://codex.wordpress.org/WordPress_in_Your_Language

3. Unzip the WordPress Language version you downloaded to your computer and copy the /wp-content/languages .po and .mo files to your WordPress website’s /wp-content/languages folder. 聽If the languages folder does not exist in your website’s wp-content folder then create it or just copy the entire languages folder from the WordPress language version that you downloaded and unzipped to your website’s wp-content folder.

4. Click on the Native Dashboard link under the Settings Panel and on the options page under Installed Languages you should now see the particular language that you just added to your website’s /wp-content folder.

5. 聽To switch languages click on the top left corner of your WP Admin bar where you will see a drop down list of available languages to choose from.

 



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有